using System;
using System.Runtime.InteropServices;
namespace invokedll {
    public class Programs {

        [DllImport (@"D:\Desktops\C++\superdlls\x64\Debug\superdlls.dll", EntryPoint = "Add")]
        public static extern int Add (ref Superman superman, int a, int b);
        [DllImport (@"D:\Desktops\C++\superdlls\x64\Debug\superdlls.dll", EntryPoint = "Mul")]
        public static extern int Mul (ref Superman superman, int a, int b);

        [DllImport (@"D:\Desktops\C++\superdlls\x64\Debug\superdlls.dll", EntryPoint = "Print")]
        public static extern int Print (ref Superman superman);
        static void Main () {

            Superman s = new Superman ();

            Console.WriteLine (Add (ref s, 5, 10));
            Console.WriteLine (Mul (ref s, 5, 20));
            Console.WriteLine(s.id);

            Print (ref s);

        }

    }

    [System.Runtime.InteropServices.StructLayout (LayoutKind.Sequential)]
    public class Superman {
        public int id;

        [System.Runtime.InteropServices.MarshalAs (UnmanagedType.ByValTStr, SizeConst = 11)]
        public string names;
    }

}